The code for the eQTL_boxplots function can be found here.
In this study, there is data from four different stimulation conditions. However, eQTL_boxplots can be used for datasets with any other kinds of “conditions”(e.g. tissue type, cell line…) or just a single condition.
root <- "Data/eQTL/Fairfax_2014"
# Make a list of paths to each of the summary stat files.
eQTL_SS_paths <- file.path(root,
c("CD14/LRRK2/LRRK2_Fairfax_CD14.txt",
"IFN/LRRK2/LRRK2_Fairfax_IFN.txt",
"LPS2/LRRK2/LRRK2_Fairfax_LPS2.txt",
"LPS24/LRRK2/LRRK2_Fairfax_LPS24.txt"))
print(eQTL_SS_paths)## [1] "Data/eQTL/Fairfax_2014/CD14/LRRK2/LRRK2_Fairfax_CD14.txt"
## [2] "Data/eQTL/Fairfax_2014/IFN/LRRK2/LRRK2_Fairfax_IFN.txt"
## [3] "Data/eQTL/Fairfax_2014/LPS2/LRRK2/LRRK2_Fairfax_LPS2.txt"
## [4] "Data/eQTL/Fairfax_2014/LPS24/LRRK2/LRRK2_Fairfax_LPS24.txt"
expression_paths <- file.path(root,
c("CD14/CD14.47231.414.b.txt",
"IFN/IFN.47231.367.b.txt",
"LPS2/LPS2.47231.261.b.txt",
"LPS24/LPS24.47231.322.b.txt"))
print(expression_paths)## [1] "Data/eQTL/Fairfax_2014/CD14/CD14.47231.414.b.txt"
## [2] "Data/eQTL/Fairfax_2014/IFN/IFN.47231.367.b.txt"
## [3] "Data/eQTL/Fairfax_2014/LPS2/LPS2.47231.261.b.txt"
## [4] "Data/eQTL/Fairfax_2014/LPS24/LPS24.47231.322.b.txt"
merged_eQTL_data <- eQTL_boxplots(
snp_list = snp_list,
eQTL_SS_paths = eQTL_SS_paths,
expression_paths = expression_paths,
probe_path = probe_path,
gene = gene,
genotype_path = genotype_path,
.fam_path = .fam_path,
show_plot = show_plot,
SS_annotations = SS_annotations,
interact = interact)## [1] ""
## [1] "+ Processsing Expression data"
## [1] "++ Extracting probe info"
## [1] "++ CD14"
## [1] "++ IFN"
## [1] "++ LPS2"
## [1] "++ LPS24"
## [1] ""
## [1] "+ Processing Summary Stats data"
## [1] ""
## [1] "+ Processing Genotype data"
## Warning in melt.data.table(., geno_subset, id.vars = c("CHR", "SNP",
## "POS", : 'measure.vars' [289, 290, 292, 293, ...] are not all of the same
## type. By order of hierarchy, the molten data value column will be of type
## 'double'. All measure variables not of type 'double' will be coerced too.
## Check DETAILS in ?melt.data.table for more on coercion.
## [1] ""
## [1] "+ Merging Summary Stats, Genotype, and Expression data"
## [1] ""
## [1] "+ Plotting eQTLs"